sbc-scenario7

The sbc-scenario7 script is triggered during the Onboarding wizard. It applies the following configuration on the SBC device that is configured to connect calls to the customer site location:

Configures a new IP Group for the Carrier leg for each new site location (indicated on SBC by <name>-c):
Configures customer name based on the Customer Short Name.
Configures a new Proxy Set and IP Profile based on the Carrier value configured in the Onboarding wizard. For example, Proxy_Set, SIP Trunk.
Configures 'Tags' parameter in IP Group based on the customer sub domain name. For example 'Trunk=BradDRService.sandbox2.audiocodes.be'.
Disables classification by Proxy Set.
Applies Call Setup Rules Set ID 1 for Carrier IP Group (see details in table below).
Configures a new IP Group for the Teams leg for each new site location (indicated on SBC by <name>-t):
Configures customer name based on the Customer Short Name.
Configures a new Proxy Set 'Teams' and new IP Profile 'Teams'
Configures 'Local Host Name' based on the customer sub domain name. For example, 'BradDRService.sandbox2.audiocodes.be'.
Enables 'Always Use Src Address' which enables the device to always send SIP requests and responses, within a SIP dialog, to the source IP address received in the previous SIP message packet.
Configures 'Tags' parameter in IP Group based on the customer sub domain name. For example 'Tenant=BradDRService.sandbox2.audiocodes.be'
Disables Classification by Proxy Set.
Applies the Call Setup Rules Set ID 0 for Teams IP Group (see details in table below).
If CAC is enabled in the Onboarding wizard, configures the selected CAC Profile and enables CAC.
If Carrier registration is enabled in the Onboarding wizard, a SIP Registration account is configured on the SBC with the following (wizard configured parameters are indicated in parenthesis):
account-name (Customer ShortName)
served-ip-group-name (Teams IP Group Name)
serving-ip-group-name (Carrier IP Group Name)
user-name (Carrier User Name)
password (Carrier Password)
host-name (Carrier Host Name)
contact-user (Carrier Main Line)

The table below summarizes the Call Setup Rules called by this script.

Index

Rules Set ID

Name

Request Type

Request Target

Request Key

Condition

Action Subject

Action Type

Action Value

1

0

-

Dial Plan

CustDialPlan

Param.Call.Src.User

DialPlan.Found exists

DstTags.Trunk

Modify

DialPlan.Result

2

0

-

Dial Plan

CustDialPlan

Header.P-Asserted-Identity.URL.User

DialPlan.Found exists

DstTags.Trunk

Modify

DialPlan.Result

3

0

-

None

-

-

var.session.0 == ''

var.session.0

Modify

Param.IPG.Src.Tags.Tenant

4

0

-

None

-

-

-

SrcTags.Source

Modify

'Teams'

5

1

-

Dial Plan

CustDialPlan

Param.Call.Dst.User

var.session.0 == ''

var.session.0

Modify

DialPlan.Result

6

1

-

-

 

 

var.session.0 != ''

DstTags.Tenant

Modify

Var.Session.0

7

1

-

None

-

-

-

SrcTags.Source

Modify

'SIPTrunk'

Copy
configure voip
 ip-group new
  name "{{CustomerId}}-c"
  proxy-set-name "{{SBC.CarrierID}}"
  ip-profile-name "{{SBC.CarrierID}}"
  tags "Trunk={{SBC.OnlinePstnGateway}}"
  classify-by-proxy-set disable
  call-setup-rules-set-id 1 
  activate
 exit
 ip-group new 
  name "{{CustomerId}}-t"
  proxy-set-name "Teams"
  ip-profile-name "Teams"
  local-host-name "{{SBC.OnlinePstnGateway}}" 
  always-use-source-addr enable 
  tags "Tenant={{SBC.OnlinePstnGateway}}" 
  classify-by-proxy-set disable 
  call-setup-rules-set-id 0
  {{#if  SBC.EnableCAC}}    
   cac-profile "{{SBC.CacProfile}}"
  {{/if }}  
  activate 
 exit

 {{#if  SBC.FlagCarrierRegistration}}  
  sip-definition account new
   account-name "{{CustomerId}}"
   served-ip-group-name "{{CustomerId}}-t"
   serving-ip-group-name "{{CustomerId}}-c"
   user-name "{{SBC.CarrierUserName}}"
   password "{{SBC.CarrierPassword}}" 
   host-name "{{SBC.CarrierHostName}}"
   contact-user "{{SBC.CarrierMainLine}}"
   register reg
   application-type sbc
   activate
  exit
 {{/if }}

 {{#each SBC.DialPlanPrefixes}}
  sbc dial-plan where name "{{this.DialPlanName}}" 
  {{#each this.Rules}}
   dial-plan-rule new
     name "{{this.Name}}"
     prefix "{{this.Prefix}}"
     tag "{{this.Tag}}"
   exit
  {{/each}}
  activate 
  exit
 {{/each}} 
do write

For each rule (for each number prefix added in the Onboarding wizard), add the prefix for customer ID (this.name) and apply it to the PSTN gateway tag (this.Tag). The following shows an example script:

Copy
configure voip
 ip-group new
  name "SIPTrunkPlus-c"
  proxy-set-name "SIPTrunk"
  ip-profile-name "SIPTrunk"
  tags "Trunk=audio0code.onmicrosoft.com"
  classify-by-proxy-set disable
  call-setup-rules-set-id 1 
  activate
 exit
 ip-group new 
  name "SIPTrunkPlus-t"
  proxy-set-name "Teams"
  ip-profile-name "Teams"
  local-host-name "audio0code.onmicrosoft.com" 
  always-use-source-addr enable 
  tags "Tenant=audio0code.onmicrosoft.com" 
  classify-by-proxy-set disable 
  call-setup-rules-set-id 0
  activate 
 exit
 
 
  sbc dial-plan where name "CustDialPlan" 
   dial-plan-rule new
     name "SIPTrunkPlus"
     prefix "+9723976400"
     tag "audio0code.onmicrosoft.com"
   exit
   dial-plan-rule new
     name "SIPTrunkPlus"
     prefix "+6138884445"
     tag "audio0code.onmicrosoft.com"
   exit
   dial-plan-rule new
     name "SIPTrunkPlus"
     prefix "+0139123345689"
     tag "audio0code.onmicrosoft.com"
   exit
  activate 
  exit
do write